<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1,
    .box2,
    .box3 {
      padding: 50px;
    }

    .box1 {
      background-color: rgb(205, 121, 121);
    }

    .box2 {
      background-color: rgb(216, 220, 175);
    }

    .box3 {
      background-color: rgb(142, 207, 223);
    }
  </style>
</head>

<body>
  <div id="app">
    <div @click="fn1(1)" class="box1">
      <div @click="fn2(2)" class="box2">
        <div @click="fn3(3, $event)" class="box3"></div>
      </div>
    </div>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    // 创建 应用实例  app （mvvm中 vm）
    const { createApp } = Vue;
    // config 参数对象
    const app = createApp({
      data() {
        return {

        }
      },
      methods: {
        fn3(n, e) {
         console.log(n);
         e.stopPropagation();
         
        },
        fn2(n) {
          console.log(n);
        },
        fn1(n) {
          console.log(n);
        }
      }
    })
    // 渲染
    app.mount('#app')
  </script>
</body>

</html>